[Previous] [Next] [Index] [Thread]

Win NT ENV var



Greetings 
       
Can you help, I called the script below in a unix server, it works perfectly.  

Hoewever, when I do the same on NT 3.51 runing MS Internet server I dont get any result instead I get a 
downloaded  sript on my browser, from the dos promt doing perl.exe scriptfile.pl produces the string ('The 
server software is:'....) and not the values.

I have already done the neccassary thing like associating pl with perl.exe in the registory.  
There some thingelse I need to do inorder to get the environmental variables?

PS. Do you know of a working search engine for windows NT 3.51, I am using MS Internet server.  
If you don't I will have to write one. I already know about ews.

Please mail me directly at jay@cnmags.condenast.co.uk

#!./inetsrv/scripts/perlnt/perl5/perl

require 'c:/inetsrv/scripts/perlnt/perl5/Lib/find.pl';

unshift(@INC, 'C:/Inetsrv/scripts/perlnt/perl5/Lib');

%list = ('SERVER_SOFTWARE', 'The server software is:',
'SERVER_NAME',              'The server hostname, DNS alias, or IP address is:',
'GATEWAY_INTERFACE',   'The CGI spec revision is',
'SERVER_PROTOCOL',     'The Name and revision of info protocol is',
'DOCUMENT_ROOT',   'The document  root directory is:',
'QUERY_STRING',  'THE query string is (form get):',
'REMOTE_HOST',  'The hostname making the request is',
'REMOTE_ADDR',  'THE IP Address of the remote user is:',
'AUTH_TYPE',    'The authentication user method is',
'REMOTE_USER',   'the authentication user is',
'REMOTE_IDENT',    'The remote user is (RFC 931)',
'CONTENT_TYPE',   'The content type of the data is (POST PUT):',
'CONTENT_LENGHT',   'The the lenght of the Content is','HTTP_ACCEPT',   'The MIME type that the client will 
accept are',
'HTTP_USER_AGENT',   'The browser of the client is',
'HTTP_REFERER',   'The URL of the referer is:',$ENV{'SCRIPT_NAME'},  'The script name is');print "Content-type: 
text/html";print "\n\n";print "<html>", "\n";
print "<head><title>Sleepmeter Results</Title>";
print "</head><body>";
print "<h3>Results:</h3>";
print "CGI";while (($env_var, $info) = each %list)  {print $info, "<B>",  $ENV{$env_var}, "</B>", "<P>", "\n";}	
   print "\n\n";



print "</body></html>";
exit (0);print (@INC);
-- 

******************* Regards ****************************************
      o""o"" ""oo'              Email: jay@smartnet.co.uk
      $  $"o       "o'          Phone: +44 0171 401 2879/2068
     o$ $   "oo        "o'      Fax  : +44 0171 401 2068
      $  $     "$oo      "o     http://www.sbu.ac.uk/~pronet
      "o  "oo  o"  "o  http://www.sbu.ac.uk/~pronet/lord/.jq/club1.htm
        $    ""      "o      "o      News:sbu.pronet
      o""              "o  http://www.worldserver.pipex.com/art96
     "$"                o" "o     $'http://194.73.81.13/
       "o                $ "o o  o"'    Irony is the only God Worth
         $              "o      "o"'            worshiping.
     oo""                 ""oo""'